import complex_query from '@feidao/web/atom/nodejs/db/complex-query';
import { spaceid, systemid, refsystemid } from './atom/config';

interface Message {
}

/**
 * @description where-eq-tb
 * @param
 */

export default async function atom(msg: Message, action_id: string, session_id: string) {
	const cquery = complex_query(action_id, spaceid, systemid);

	const res = await cquery.add_field('msz_test1', '_id', '_id')
		.add_field('msz_test1', 'name', 'name')
		.add_field('msz_test1', 'num', 'num1')
		.add_field('msz_test2', 'num', 'num2')
		.where_gte_tb('msz_test1', 'num', 'msz_test2', 'num')
		.inner_join('msz_test1', 'msz_test2', ['name', 'name'])
		.exec();

	return res;
}
